import React, {useEffect} from 'react';
import SideMenu from "../../components/sandbox/sidemune/SideMenu";
import TopHeader from "../../components/sandbox/TopHeader";
import NewsRouter from "../../components/sandbox/NewsRouter";
import { Layout } from 'antd';
import './NewsSandBox.css'
// 加载进度条
import Nprogress from 'nprogress'
import 'nprogress/nprogress.css'

const { Content } = Layout;

export default function NewsSandBox() {

    // 页面一开始就走
    Nprogress.start()
    useEffect(() => {
        // 页面更新完成停止
        Nprogress.done()
    })

    return (
        <Layout>
            <SideMenu/>
            <Layout className="site-layout">
                <TopHeader/>

                <Content
                    className="site-layout-background"
                    style={{
                        margin: '24px 16px',
                        padding: 24,
                        minHeight: 280,
                        overflow: 'auto'
                    }}
                >
                    <NewsRouter/>
                </Content>
            </Layout>
        </Layout>
    )
}